package xyz.blushyes.controller;

import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.blushyes.request.AuthRequest;
import xyz.blushyes.service.UserInfoService;

import javax.validation.Valid;

@RestController
@RequestMapping("/auth")
@RequiredArgsConstructor
public class AuthController {
    private final UserInfoService userService;

    @PostMapping("/login")
    public String login(@Valid @RequestBody AuthRequest request) {
        return userService.login(request);
    }
}
